﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RTracker.Models.Common
{
    /// <summary>
    /// Class for Pagging, used to get and set values of pagging properties.
    /// </summary>
    public class CPaging
    {
        #region "Members Variables"
        private Int64 m_nTotalRecordsCount;  // to store total records in module.
        private int m_nPageNumber;           // to store current selected page number.
        private int m_nPageSize;             // to store page size.
        #endregion

        #region "Constructors"
        // default constructor
        public CPaging()
        {
            m_nTotalRecordsCount = 0;
            m_nPageNumber = 0;
            m_nPageSize = 0;
        }
        // parameterized constructor
        public CPaging(Int64 nTotalRecordsCount, int nPageNumber,int nPageSize)
        {
            m_nTotalRecordsCount = nTotalRecordsCount;
            m_nPageNumber = nPageNumber;
            m_nPageSize = nPageSize;

        }
        #endregion

        #region "Properties"

        /// <summary>
        /// Used to store total records in module.
        /// </summary>
        public Int64 TotalRecordsCount
        {
            get { return m_nTotalRecordsCount; }
            set { m_nTotalRecordsCount = value; }
        }

        /// <summary>
        ///  Used to store current selecgted page number.
        /// </summary>
        public int PageNumber
        {
            get { return m_nPageNumber; }
            set { m_nPageNumber = value; }
        }

        /// <summary>
        ///  Used to store  page size.
        /// </summary>
        public int PageSize
        {
            get { return m_nPageSize; }
            set { m_nPageSize = value; }
        }

        #endregion
    }
}